# PD Configuration
initial-cluster-state = "new"

{% for item, value in pd_conf.global | dictsort -%}
{{ item }} = {{ value | to_json }}
{% endfor %}

[security]
{% for item, value in pd_conf.security | dictsort -%}
{{ item }} = {{ value | to_json }}
{% endfor %}

[log]
{% for item, value in pd_conf.log | dictsort_by_value_type -%}
{% if value is not mapping -%}
{{ item }} = {{ value | to_json}}
{% else %}

[log.{{ item }}]
{% for sub_item, sub_value in value | dictsort -%}
{{ sub_item }} = {{ sub_value | to_json }}
{% endfor %}
{% endif %}
{% endfor %}

[metric]
{% for item, value in pd_conf.metric | dictsort -%}
{{ item }} = {{ value | to_json }}
{% endfor %}

[schedule]
{% for item, value in pd_conf.schedule | dictsort -%}
{{ item }} = {{ value | to_json }}
{% endfor %}

[replication]
{% for item, value in pd_conf.replication | dictsort -%}
{{ item }} = {{ value | to_json}}
{% endfor %}
